﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Train_IssueList : System.Web.UI.Page
{
    private Srvtools.WebDataSet WMaster;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            InitializeComponent();

            Master.DataSource = WMaster;

            MasterPage_MasterPage mpg = (MasterPage_MasterPage)this.Page.Master;
            mpg.HelpHref = "";
            mpg.PageName = "培训主题列表";
            mpg.PicUrl = "";
            mpg.IntiBar();
        }
    }

    private void InitializeComponent()
    {
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Train_IssueList));
        this.WMaster = new Srvtools.WebDataSet();
        ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
        // 
        // WMaster
        // 
        this.WMaster.Active = true;
        this.WMaster.AlwaysClose = false;
        this.WMaster.PacketRecords = 100;
        this.WMaster.Position = -1;
        this.WMaster.RemoteName = "Train.View_Issue";
        this.WMaster.ServerModify = false;
        ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();
    }

    protected void Search_Click(object sender, EventArgs e)
    {
        string query = "";
        if (txtClass.Text.Trim() != "")
        {
            query += " And LessonName like '%" + txtClass.Text.Trim() + "%' ";
        }

        if (txtIssus.Text.Trim() != "")
        {
            query += " And IssueName like '%" + txtIssus.Text.Trim() + "%' ";
        }

        if (txtTime.Text.Trim() != "")
        {
            query += " And TrainDate ='" + txtTime.Text.Trim() + "'";
        }
        InitializeComponent();
        WMaster.SetWhere(" 1=1 " + query);
        Master.DataSource = WMaster;
    }
    protected void DownLoad_Click(object sender, EventArgs e)
    {
        Response.Redirect("IssuePractice.aspx?issid=-1");
    }
}
